package com.kaifa.org.tp04;

import org.springframework.context.ApplicationContext;
import org.springframework.context.support.ClassPathXmlApplicationContext;
import org.springframework.jdbc.core.JdbcTemplate;

public class TestJdbcTemplate {
    public static void main(String[] args) {
        ApplicationContext ac =new ClassPathXmlApplicationContext("jdbc.xml");
        JdbcTemplate jdbcTemplate=(JdbcTemplate)ac.getBean("jdbcTemplate");
        String sql="create table t_role(id int primary key auto_increment,role_name varchar(50))";
        jdbcTemplate.execute(sql);
    }
}
